define(function(require, exports, module) {
	var utils = require("utils");
	var SidebarView = require("./views/sidebarView");
	var DocumentView = require("./views/documentView");
	var tpl = require("text!/acf2java/backbone/text");
	console.log(tpl);
	var r_data={
			id:"students",
			data:[
				{name: "lily", gender: 0}, 
				{name: "lilei", gender: 1}, 
				{name: "jim", genger: 1}
			]	
			};
	var aaa=_.template(tpl);
	console.log(aaa(r_data));
	var ddd=_.template("Hello {= id }!");
	console.log(ddd({id:'王二小'}));
	var tml = _.template($('#tpl').html())(r_data);
	console.log(tml);
	var view = Backbone.View.extend({
		el: "body",
		events: {
			'click button[role="test"]': "fnTest",
			'click button[role="testLoadText"]': "fnTestLoadText",
		},
		initialize: function(options) { /** 初始化 */
			this.eventBus = _.extend({}, Backbone.Events);
			console.log(options);
			this.sidebarView = new SidebarView({eventBus:this.eventBus});
			this.documentView = new DocumentView({eventBus:this.eventBus});
		},
		render: function() { /** 页面渲染 */
			
		},
		fnTest:function(){
			console.log("appView fnTest do something >>>>>>>>>>>>>>>");
			var $msgBox=$("#msgBox");//消息框
			var alert_tpl=$msgBox.children().first();//消息模板
			alert_tpl.clone(true).appendTo($msgBox).fadeIn("fast").delay(3000)
					.fadeOut("slow", function() {
						this.remove();
					});
		}
	});
	module.exports = view;
});